When a resource is not used, Kanzi Engine keeps it in the memory until you call ResourceManager::purge
. You can set how Kanzi Engine handles unused resources when you call ResourceManager::purge
for each resource separately, or for the resources in the entire project.
You an also set Kanzi Engine to immediately remove from memory resources that are not in use by setting ResourceManager::setDefaultMemoryStrategy
to OptimizeMemory
.
To set for the entire project how Kanzi Engine handles unused resources when you call ResourceManager::purge
, in the main menu select > , and in the Properties set:
This setting applies to all resources for which you do not separately set the Keep Alive Behavior property.
To set how Kanzi Engine handles individual unused resources when you call ResourceManager::purge
, in the Library select a resource, and in the Properties add and set the Keep Alive Behavior property:
To set how Kanzi Engine handles unused resources using the API, use Resource::isKeepAlive
and Resource::setKeepAlive
.